﻿using com.uplus.snowleopardframework.Attributes;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WebApi.Bill.Biz;

namespace WebApi.Models
{
    /// <summary>
    /// 邮件信息
    /// </summary>
    [SugarTable("TbEmail")]
    [DisplayName("邮件信息")]
    public class EmailModel
    {
        [DisplayName("主键")]
        [SugarColumn(IsNullable = false, ColumnName = "pkCode", IsPrimaryKey = true, ColumnDataType = "varchar", Length = 2, ColumnDescription = "主键")]
        public string Code { get; set; }

        [DisplayName("客户编码")]
        [SugarColumn(IsNullable = true, ColumnName = "fkCust", ColumnDataType = "varchar", Length = 4, ColumnDescription = "客户表外键")]
        public string FkCust { get; set; }

        [ControlType(Type = ControlTypeAttribute.Types.Text, PlaceHolder = "请输入邮件服务器地址", IsDisabled = false)]
        [DisplayName("邮件服务器地址")]
        [SugarColumn(IsNullable = true, ColumnName = "sEmailHost", ColumnDataType = "varchar", Length = 50, ColumnDescription = "邮件服务器地址")]
        public string SEmailHost { get; set; }

        [ControlType(Type = ControlTypeAttribute.Types.Text, PlaceHolder = "请输入邮箱名称", IsDisabled = false)]
        [DisplayName("邮箱名称")]
        [SugarColumn(IsNullable = true, ColumnName = "sEmailName", ColumnDataType = "varchar", Length = 128, ColumnDescription = "邮箱名称")]
        public string SEmailName { get; set; }

        [ControlType(Type = ControlTypeAttribute.Types.Text, PlaceHolder = "请输入邮件服务器端口号", IsDisabled = false)]
        [DisplayName("邮件服务器端口号")]
        [SugarColumn(IsNullable = true, ColumnName = "sEmailPort", ColumnDataType = "varchar", Length = 128, ColumnDescription = "邮件服务器端口号")]
        public string SEmailPort { get; set; }

        [ControlType(Type = ControlTypeAttribute.Types.Text, PlaceHolder = "请输入邮箱密码", IsDisabled = false)]
        [DisplayName("邮箱密码")]
        [SugarColumn(IsNullable = true, ColumnName = "sEmailPwd", ColumnDataType = "varchar", Length = 128, ColumnDescription = "邮箱密码")]
        public string SEmailPwd { get; set; }

        [ControlType(Type = ControlTypeAttribute.Types.Select, PlaceHolder = "请选择状态", IsDisabled = false)]
        [DisplayName("状态")]
        [SugarColumn(IsNullable = true, ColumnName = "nStatus", ColumnDataType = "int", ColumnDescription = "状态")]
        public int NStatus { get; set; }

        [DisplayName("操作人")]
        [SugarColumn(IsNullable = true, ColumnName = "sOperator", ColumnDataType = "varchar", Length = 50, ColumnDescription = "操作人")]
        public string SOperator { get; set; }


        [DisplayName("操作时间")]
        [SugarColumn(IsNullable = true, ColumnName = "tOperate", ColumnDataType = "datetime", ColumnDescription = "操作时间")]
        public DateTime? TOperate { get; set; }

        [DisplayName("创建时间")]
        [SugarColumn(IsNullable = true, ColumnName = "tCreate", ColumnDataType = "datetime", ColumnDescription = "创建时间")]
        public DateTime? TCreate { get; set; }

        [SugarColumn(ColumnName = "isSSL")]
        public bool IsSSL { get; set; }
    }
}
